/**
 */
module.exports = class extends think.Model {
  /// 编辑网站配置
  async configs (data) {
      const db = think.mongoose('mongo/config')
      await db.updateOne({}, data)
      let config = await db.findOne({})
      return config
  }
  /// 获取支付配置
  async aliConfig (data) {
    const db = think.mongoose('mongo/alipay')
    await db.updateOne({}, data)
    let config = await db.findOne({})
    return config
  }
  /// 获取广告配置
  async adConfig (data) {
      const db = think.mongoose('mongo/ad_config')
      await db.updateOne({}, data)
      let config = await db.findOne({})
      return config
  }
};
